<?php
declare (strict_types = 1);

namespace app\admin\command;

use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use think\facade\Db;

class config extends Command
{
    protected function configure()
    {
        // 指令配置
        $this->setName('config')
            ->setDescription('the config command  配置相关信息');
    }

    protected function execute(Input $input, Output $output)
    {
        //0--5
        //5-5
        //5-10
        //10年以上
        $data = [
                [
                    "sys_type" => 5,
                    "sys_name" => "体验版",
                    "create_time" => time(),
                    "update_time" => time(),
                ],
                [
                    "sys_type" => 5,
                    "sys_name" => "初级版",
                    "create_time" => time(),
                    "update_time" => time(),
                ],
                [
                    "sys_type" => 5,
                    "sys_name" => "中级版",
                    "create_time" => time(),
                    "update_time" => time(),
                ],
                [
                    "sys_type" => 5,
                    "sys_name" => "高级版",
                    "create_time" => time(),
                    "update_time" => time(),
                ],
        ];

        Db::name("sys_config") -> insertAll($data);

        $output->writeln('config');
    }
}
